package com.huike.web.controller.common;

import com.huike.clues.service.ISysFileService;
import com.huike.common.core.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author EthanRuins
 * @date 2023/7/13
 * @apiNote
 */
@RestController
@RequestMapping
@AllArgsConstructor
public class CommonController {
    private final ISysFileService fileService;

    @PostMapping("/common/upload")
    @ApiOperation(value = "文件上传")
    public AjaxResult<String> upload(MultipartFile file) {
        return fileService.upload(file);
    }
}
